package com.lemeshko.tdd;

import java.util.Collections;
import java.util.List;

public class ListUtils {

	/**
	 * Reverses a specified list.
	 * 
	 * @param list
	 *            a list to be reversed, may be empty.
	 * 
	 * @throws IllegalArgumentException
	 *             if input list is null.
	 */
	public static void reverseList(List list) throws IllegalArgumentException {

		if (list == null)
			throw new IllegalArgumentException("List not may be null");

		Collections.reverse(list);
	}

}
